<?php
namespace application\core;

class order{

    public $formNum;
    public $userName;

    public function __construct()
    {
        echo "new start<br>";
    }

    /**
     * @param $price 价格
     * @return string 返回数据
     */
    public function creteForm($price){
        echo "我正在创建订单<br>";
        $new = date("YmdHis",time());
        $this->formNum = $new.rand(100000,999999);
        $result = "订单编号:".$this->formNum." 订单价格:".$price;
        return $result."<br>";
    }

    public function deleteForm($userName = null){
        echo $this->formNum."已取消";
    }


    public function __destruct()
    {
        echo "new end";
    }

}